#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
#include <map>
using namespace std;

int main()
{
    int x = 0;
    cin >> x;
    string s = to_string(x);
    map<char, bool> m;
    for (int i = s.size() - 1;i >= 0;i--)
    {
        if (m[s[i]] == false)
        {
            cout << s[i];
            m[s[i]] = true;
        }
    }
    return 0;
}
